package com.fenyin.samples.study.quartz;  

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;
  
public class SimpleScheduler {
	
	private final static Log logger = LogFactory.getLog(SimpleScheduler.class); 
	
	public void startShedule(){
		Scheduler scheduler = null;
		try {
			scheduler = StdSchedulerFactory.getDefaultScheduler();
			scheduler.start();
			
			logger.info("SimppleScheduler is beging to schedule.");
		} catch (SchedulerException e) {
			logger.error("startShedule error",e);
		}
	}
	
	public static void main(String[] args){
		SimpleScheduler simpleScheduler = new SimpleScheduler();
		simpleScheduler.startShedule();
	}
}
